package com.zisu.rabbitconsumer.Entity;

import com.fasterxml.jackson.annotation.JsonPropertyOrder;

/**
 * @Desc: ""
 * @Author: caixiang
 * @DATE: 2021/4/26 14:11
 */
@JsonPropertyOrder(value = {"userName","age","password"})
public class User {
    private String userName;
    private Integer age;
    private String password;

    public User(String userName, Integer age,String password) {
        this.userName = userName;
        this.age = age;
        this.password = password;
    }
    //jackson 在反序列化 对象的时候，要加一个无参的 构造函数，否则会报错Caused by: com.fasterxml.jackson.databind.exc.InvalidDefinitionException
    public User() {
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }
}
